home *** CD-ROM | disk | FTP | other *** search
/ TestDrive Windows 1993 Fall / TestDrive Windows 1993 Fall.iso / dbase / dtl / as_pause.cod < prev    next >
Encoding:
Text File  |  1993-03-09  |  1.1 KB  |  49 lines

  1. //
  2. // Module Name: AS_PAUSE.COD
  3. // Description: Procedure to display a message or errors in a window
  4. //
  5. {//
  6.  // Enum string constants for international translation
  7.  //
  8.  enum error_msg1 = "[An error has occurred !! - Error message: ]+MESSAGE()",
  9.       error_msg2 = "[Error # ]+lc_message",
  10.       error_wait = " Press any key to continue..."
  11.  ;
  12. }
  13. PROCEDURE Pause
  14. PARAMETER pc_msg
  15. *{replicate("-",69)}
  16. * Procedure to display a message or errors in a window
  17. * Parameters : pc_msg = message line
  18. *{replicate("-",69)}
  19.   PRIVATE lc_msg, lCursor
  20.  
  21.   IF TYPE("lc_message")="U"
  22.     gn_error=ERROR()
  23.   ENDIF
  24.   lc_msg = pc_msg
  25.   lc_option='0'
  26.  
  27.   ACTIVATE WINDOW Pause
  28.   IF gn_error > 0
  29.     IF TYPE("lc_message")="U"
  30.       @ 0,1 SAY LEFT( {error_msg1} , 76 )
  31.     ELSE
  32.       @ 0,1 SAY LEFT( {error_msg2} , 76 )
  33.     ENDIF
  34.   ENDIF
  35.  
  36.   @ 1,1 SAY LEFT( lc_msg, 76 )
  37.   lCursor = SET( "CURSOR" ) = "ON"
  38.   SET CURSOR OFF
  39.   WAIT "{error_wait}"
  40.   IF lCursor
  41.     SET CURSOR ON
  42.   ENDIF
  43.  
  44.   DEACTIVATE WINDOW Pause
  45.  
  46. RETURN
  47. *-- EOP: Pause WITH pc_msg
  48. // EOP AS_PAUSE.COD
  49.